package cn.jluzh.blog.modules.article.service;

import cn.jluzh.blog.modules.article.entity.SysArticle;
import cn.jluzh.blog.modules.article.entity.SysArticleArchives;
import cn.jluzh.blog.modules.user.entity.SysUser;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * 文章表
 * @author hjc
 */
public interface ArticleService extends IService<SysArticle> {


    List<SysArticle> getAllArticle();

    List<SysArticle> getArtByCateId(Integer categoryId);

    List<SysArticle> getArtByTagId(Integer tagId);

    JSONObject getArticleDetailAndAddViewNum(Long id);

    List<SysArticleArchives> queyArticleArchives(int limit);

    List<SysArticle> getArtByDate(String year, String month);

    Long updateOneArticle(SysUser user, SysArticle article, JSONObject json);

    Long addOneArticle(SysUser user, JSONObject json);

    List<SysArticle> getAllArticleByTitle(String query);
}

